﻿using Cassandra.Data.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cognitum.CassandraTableStorage.Entities
{
    [AllowFiltering]
    [Table]
    public class user_active_entity : TableServiceEntity
    {
        #region | Constructors  |

        public user_active_entity(string partitionKey)
            : base(partitionKey)
        { }

        public user_active_entity()
            : this(Guid.NewGuid().ToString())
        { }

        #endregion | Constructors  |

        #region | Membership provider properties |

        [ClusteringKey(1),
        Column]
        public string application_name { get; set; }

        [ClusteringKey(2),
        Column]
        public String username { get; set; }

        [Column]
        [SecondaryIndex]
        public DateTimeOffset last_activity_date { get; set; }

        #endregion | Membership provider properties |
    }
}